//
//  LoadingView.swift
//  UGSwiftMagicbox
//
//  Created by MBA on 2020/10/2.
//  Copyright © 2020 MBA. All rights reserved.
//

import SwiftUI

struct LoadingView: View {

    var body: some View {
        VStack {

            LottieView(filename: "loading")
                
                .opacity(1)
                .animation(Animation.linear(duration: 1))
                .scaleEffect(1.3)
                .frame(width: 120, height: 120, alignment: .center)
                .offset(x: -10, y: 10.0)
                .background(Color.white.opacity(0.3))
            
       
        }
        .clipShape(RoundedRectangle(cornerRadius: 30, style: .continuous))
        .shadow(color: Color.white.opacity(0.3), radius: 30, x: 0, y: 30)
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .scaleEffect(1)
        .animation(.spring(response: 0.5, dampingFraction: 0.6, blendDuration: 0))
     
       
    }
}

struct LoadingView_Previews: PreviewProvider {
    static var previews: some View {
        LoadingView()
    }
}
